<?php /* Smarty version Smarty-3.1.11, created on 2013-03-18 09:41:54
         compiled from "./smarty/templates/hotellist_new.tpl" */ ?>
<?php /*%%SmartyHeaderCode:7442437145141b3004ff394-39995860%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '5e1217ba682265e078ddf0c054aea28b2958dbaf' => 
    array (
      0 => './smarty/templates/hotellist_new.tpl',
      1 => 1363599707,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '7442437145141b3004ff394-39995860',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_5141b3005990e0_49804107',
  'variables' => 
  array (
    'hotelArray' => 0,
    'hotel' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5141b3005990e0_49804107')) {function content_5141b3005990e0_49804107($_smarty_tpl) {?><?php  $_smarty_tpl->tpl_vars['hotel'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['hotel']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['hotelArray']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['hotel']->key => $_smarty_tpl->tpl_vars['hotel']->value){
$_smarty_tpl->tpl_vars['hotel']->_loop = true;
?>
    <input id="hotelId_hidden_<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
" value="<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
" type="hidden"/>
    <div id="hotel-division">
        <div id="hotel-ribbon-offers" class="hidden border-on" >
            <img src="" />
            <span>Promotion:</span>
            <span id="hotel-text">Discount 30 % -- Book now !&nbsp;&nbsp;&nbsp;</span>
        </div>
        <div id="hotel-data" class="border-on marginless" >
            <img class="thumbnailImage inline-block left" <?php if ($_smarty_tpl->tpl_vars['hotel']->value['thumbnailUrl']!=''){?>src="<?php echo $_smarty_tpl->tpl_vars['hotel']->value['thumbnailUrl'];?>
"<?php }else{ ?> src="./images/missing_photo.png" <?php }?> id="thumb<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
"/>
            <div id="hotel-content" class="inline-block right">
                <span id="hotel-name-price">
                    <h3 class="left"><?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelName'];?>
 </h3>
                    <h3 class="right" id="price_text">Avg rate: <?php echo intval(($_smarty_tpl->tpl_vars['hotel']->value['lRate']));?>
 <?php echo $_smarty_tpl->tpl_vars['hotel']->value['rateCurrencyCode'];?>
</h3>
                </span>
                <span id="hotel-short-desc" ><?php echo htmlspecialchars_decode($_smarty_tpl->tpl_vars['hotel']->value['shortDesc'], ENT_QUOTES);?>
</span>
            </div>
        </div>
        <div id="hotel_tabs">
            <div>
                <table cellspacing="0" id="tabs_table">
                    <tr>
                        <td id="hotel_details_tab<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
" 
                            class="hotel_details_tab" 
                            onmouseover="a_hover(1,<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
);"  
                            onmouseout="a_mouseout(1,<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
);" 
                            onclick="a_click(1,<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
);grabData('INFO',<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
,<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
);">
                            <input type="hidden" id="tb_hotel_hidden<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
" value="0" />
                            <label id="hotels_tb<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
" class="hotels_tb"   
                                   onmouseover="a_hover(1,<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
);" 
                                   onmouseout="a_mouseout(1,<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
);">Hotels Details</label>
                        </td>
						<td id="room_details_tab<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
"
                            class="room_details_tab"
                            onclick="a_click(2,<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
);grabData('AVAIL',<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
,<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
);">
                            
                            <input type="hidden" id="tb_room_hidden<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
" value="0" />
                            <label id="room_tb<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
"
                                   class="room_tb" 
                                   >Check Availability</label>
                        </td>
                        <td id="galery_tab<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
"
                            class="galery_tab"  
                            onmouseover="a_hover(3,<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
);" 
                            onclick="a_click(3,<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
); grabData('IMG',<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
,<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
);" 
                            onmouseout="a_mouseout(3,<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
);">
                            <input type="hidden" id="tb_galery_hidden<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
" value="0" />
                            <label class="galery_tb" id="galery_tb<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
" 
                                   onmouseover="a_hover(3,<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
);" 
                                   onmouseout="a_mouseout(3,<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
);">Galery </label>
                        </td>
                        <td></td>
                        <td width="200px"></td>
                        <td class="hotel_options">
                            Star Rating <img id="star_rating" src="./images/rating/star<?php echo sprintf("%.1f",$_smarty_tpl->tpl_vars['hotel']->value['rating']);?>
.png"  height="15" />
                        </td>

                    </tr>
                </table>
            </div>
            <div class="hotels" id="hotels<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
" style="display:none;"></div>
            <div class="rooms" id="rooms<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
" style="display:none;"></div>
            <div class="galery"  id="galery<?php echo $_smarty_tpl->tpl_vars['hotel']->value['hotelId'];?>
" style="display:none;"></div>
        </div>
    </div>
<?php } ?>

    <script> 
        var grabData = function(service, id, hotelId){
            var field,
                data={
                    service: service,
                    hotelId: hotelId,
                    token: id,
                    thumbnailImage: $("#thumb"+hotelId).attr("src")
                };
            switch(service){
                case "AVAIL":
                    field = $("#rooms"+id);

                    break;
                case "INFO":
                    field = $("#hotels"+id);
                    break;
                case "IMG":
                    field = $("#galery"+id);
                    break;
                case "CANCEL":
                    field = $("#cancelationPolicy"+id);
                    var idx =id.slice(0,id.indexOf('_'));
                    data={
                        service: service,
                        hotelId: hotelId,
                        token: idx,
                        supplierType: $("#supplierType"+idx).val(),
                        roomTypeCode: $("#roomCode"+idx).val(),
                        rateCode: $("#roomRateCode"+idx).val(),
                        rateKey: $("#roomRateKey"+idx).val()
                    };
                    console.log(id.slice(0,id.indexOf('_')));
                    break;
                default:
                    break;
            }

            ajaxCall("POST","data_grabber.php",data,field);
        };
    </script> 
<?php }} ?>